package cn.fintecher.pangolin.entity.elastic;

import cn.fintecher.pangolin.common.annotation.ReportAnno;
import cn.fintecher.pangolin.common.enums.BaseSelect;
import cn.fintecher.pangolin.common.utils.Constants;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;

import java.util.Date;

/**
 * @Auther: xiaqun
 * @Description: 委托方回款报表
 * @Date: 11:28 2019/12/11
 */

@Data
@Document(indexName = Constants.PRINCIPAL_PAYMENT, type = Constants.PRINCIPAL_PAYMENT, shards = 1, replicas = 0)
@ApiModel(value = "委托方回款报表", description = "委托方回款报表")
public class PrincipalPayment {
    @ApiModelProperty(value = "主键ID")
    @Id
    private String id;

    @ApiModelProperty(value = "委托方ID")
    private String principalId;

    @ApiModelProperty(value = "委托方名称")
    @ReportAnno(name = "委托方", sort = 1, isMerge = true)
    private String principalName;

    @ApiModelProperty(value = "批次号")
    @ReportAnno(name = "批次号", sort = 2, isMerge = true)
    private String batchNumber;

    @ApiModelProperty(value = "委案日期")
    @ReportAnno(name = "委案开始时间", sort = 3)
    private Date delegationDate;

    @ApiModelProperty(value = "退案日期")
    @ReportAnno(name = "委案结束时间", sort = 4)
    private Date endCaseDate;

    @ApiModelProperty(value = "委案数量")
    @ReportAnno(name = "委案数量", sort = 5)
    private Integer totalNumber = 0;

    @ApiModelProperty(value = "委案金额")
    @ReportAnno(name = "委案金额", sort = 6, scale = 2)
    private Double totalAmt = 0d;

    @ApiModelProperty(value = "回款笔数")
    @ReportAnno(name = "回款笔数", sort = 7)
    private Integer paymentNumber = 0;

    @ApiModelProperty(value = "回款金额")
    @ReportAnno(name = "回款金额", sort = 8, scale = 2)
    private Double paymentAmt = 0d;

    @ApiModelProperty(value = "回款率")
    @ReportAnno(name = "回款率(%)", sort = 9, scale = 4, isRate = true)
    private float paymentRate = 0f;

    @ApiModelProperty(value = "是否统计")
    private BaseSelect isStatistics;
}
